<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<%@ include file="head.jsp" %>
<body>
<%@ include file="nav.jsp" %>
<div class="container-fluid">

    <a href="/admin/product/add" class="btn btn-primary">添加</a>
    <table class="table table-hover">
        <tr>
            <th>id</th>
            <th>Logo</th>
            <th>名称</th>
            <th>价格</th>
            <th>分类</th>
            <th>销量</th>
            <th>库存</th>
            <th>状态</th>
            <th>排序</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${products}" var="product">
            <tr>

                <td>${product.id}</td>
                <td><img src="${product.logo}" alt="" height="80"></td>
                <td>${product.name}</td>
                <td>${product.price}</td>
                <td>${product.categoryName}</td>
                <td>${product.sale}</td>
                <td>${product.stock}</td>
                <td>${product.status}</td>
                <td>${product.sort}</td>
                <td>
                    <a href="/admin/product/edit?id=${product.id}" class="btn btn-success">编辑</a>
                    <a href="/admin/product/del?id=${product.id}" class="btn btn-danger">删除</a>

                </td>

            </tr>
        </c:forEach>


    </table>
</div>

<%@ include file="foot.jsp" %>
</body>
</html>
